<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑房租信息</title>
	<link rel="stylesheet" href="/css/main.css">
	<link rel="stylesheet" href="/css/font-awesome/css/font-awesome.css">
</head>
<body>
<div class="box">

	<h3>编辑房租信息</h3>
	<form action="/rect/edit" method="post">
		<table class="form-table">
			<tr>
				<td>序号</td>
				<td colspan="3" class="control">
					<input type="text" name="r_id" placeholder="序号" value="${rect.r_id}" readonly>
				</td>
			</tr>
			<tr>
				<td>房屋地址</td>
				<td colspan="3" class="control">
					<select name="flat_id">
						<c:forEach items="${flats}" var="flat">
							<option value="${flat.h_id == rect.flat_id ? "selected" : ""}">${flat.h_address}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td>租户姓名</td>
				<td colspan="3" class="control">
					<select name="l_id">
						<c:forEach items="${lss}" var="ls">
							<option value="${ls.l_id == rect.l_id ? "selected" : ""}">${ls.l_name}</option>
						</c:forEach>
					</select>
				</td>
			</tr>
			<tr>
				<td>付款金额</td>
				<td colspan="3" class="control">
					<input type="text" name="r_money" placeholder="付款金额" value="${rect.r_money}">
				</td>
			</tr>
			<tr>
				<td>付款时间</td>
				<td colspan="3" class="control">
					<input type="date" name="r_time"  value="<fmt:formatDate value="${rect.r_time}" pattern="yyyy-MM-dd" />">
				</td>
			</tr>
			<tr>
				<td>付款说明</td>
				<td colspan="3" class="control">
					<input type="text" name="r_remark" placeholder="付款说明" value="${rect.r_remark}">
				</td>
			</tr>

		</table>
		<div class="buttons">
			<input class="btn btn-primary va-bottom" type="submit" value="保存">&nbsp;&nbsp;
			<a class="btn btn-default" href="javascript:history.go(-1)">返回</a>
		</div>
	</form>
</div>
</body>
</html>